package com.itmk.business.article.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName(value = "commentmanager")
public class CommentManager {
    @TableId
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long userId;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long commentId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    //更新时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private Integer state;

    public CommentManager(Long userId, Long commentId, Integer state) {
        this.userId = userId;
        this.commentId = commentId;
        this.state = state;
    }

    public CommentManager(Long id, Integer state) {
        this.id = id;
        this.state = state;
    }

    public CommentManager() {
    }
}
